<template>
	<view	class="ikz-stat">
    <view class="ikz-stat-top">
      <view class="ikz-stat-title" @click="showStatus(2)" :style="show_status==2?'background: #FBAB7E;color: #fff;':''">
        近一周
      </view>
      <view class="ikz-stat-title" @click="showStatus(3)" :style="show_status==3?'background: #FBAB7E;color: #fff;':''">
        近一月
      </view>
      <view class="ikz-stat-title" @click="showStatus(4)" :style="show_status==4?'background: #FBAB7E;color: #fff;':''">
        近一年
      </view>
    </view>
    <view class="ikz-stat-list" v-if="show_status == 2">
      <view class="ikz-stat-list-item ikz-stat-list-line">
        <view class="ikz-stat-list-num">
          ￥{{showData.week_income}}
        </view>
        <view class="ikz-stat-list-title">
          收入
        </view>
      </view>
      <view class="ikz-stat-list-item ikz-stat-list-line">
        <view class="ikz-stat-list-num">
          {{showData.week_finish_order_count}}
        </view>
        <view class="ikz-stat-list-title">
          完成订单
        </view>
      </view>
      <view class="ikz-stat-list-item" v-if="status == 3">
        <view class="ikz-stat-list-num">
          {{showData.week_receive_count}}
        </view>
        <view class="ikz-stat-list-title">
          接单员
        </view>
      </view>
      <view class="ikz-stat-list-item" v-else>
        <view class="ikz-stat-list-num">
          {{showData.week_in_progress_order_count}}
        </view>
        <view class="ikz-stat-list-title">
          进行订单
        </view>
      </view>
    </view>
    <view class="ikz-stat-list" v-if="show_status ==3">
      <view class="ikz-stat-list-item ikz-stat-list-line">
        <view class="ikz-stat-list-num">
          ￥{{showData.month_income}}
        </view>
        <view class="ikz-stat-list-title">
          收入
        </view>
      </view>
      <view class="ikz-stat-list-item ikz-stat-list-line">
        <view class="ikz-stat-list-num">
          {{showData.month_finish_order_count}}
        </view>
        <view class="ikz-stat-list-title">
          完成订单
        </view>
      </view>
      <view class="ikz-stat-list-item" v-if="status== 3">
        <view class="ikz-stat-list-num">
          {{showData.month_receive_count}}
        </view>
        <view class="ikz-stat-list-title">
          接单员
        </view>
      </view>
      <view class="ikz-stat-list-item" v-else>
        <view class="ikz-stat-list-num">
          {{showData.month_in_progress_order_count}}
        </view>
        <view class="ikz-stat-list-title">
          进行订单
        </view>
      </view>
    </view>
    <view class="ikz-stat-list" v-if="show_status == 4">
      <view class="ikz-stat-list-item ikz-stat-list-line">
        <view class="ikz-stat-list-num">
          ￥{{showData.year_income}}
        </view>
        <view class="ikz-stat-list-title">
          收入
        </view>
      </view>
      <view class="ikz-stat-list-item ikz-stat-list-line">
        <view class="ikz-stat-list-num">
          {{showData.year_finish_order_count}}
        </view>
        <view class="ikz-stat-list-title">
          完成订单
        </view>
      </view>
      <view class="ikz-stat-list-item" v-if="status == 3">
        <view class="ikz-stat-list-num">
          {{showData.year_receive_count}}
        </view>
        <view class="ikz-stat-list-title">
          接单员
        </view>
      </view>
      <view class="ikz-stat-list-item" v-else>
        <view class="ikz-stat-list-num">
          {{showData.year_in_progress_order_count}}
        </view>
        <view class="ikz-stat-list-title">
          进行订单
        </view>
      </view>
    </view>
	</view>
</template>

<script>
import ikz from '@/pages/Common/tools';
export default {
	name: 'Statistics',
	props: {
		showData: {
			type: Object
		},
    status:{
      type:String
    }
	},
	data() {
		return {
      show_status:2,
		};
	},
	mounted() {
  },
	methods: {
    showStatus(show_status){
      this.show_status = show_status;
    }
	}
};
</script>

<style lang="scss" scoped>
  .ikz-stat{
    width: 100%;
    background: #fff;
  }
  .ikz-stat-top{
    display: flex;
    align-items: center;
  }
  .ikz-stat-title{
    width: 33%;
    height: 70rpx;
    line-height: 70rpx;
    text-align: center;
  }
  .ikz-stat-list{
    width: 100%;
    display: flex;
    align-items: center;
    padding: 30rpx 0px;
  }
  .ikz-stat-list-item{
    width:33%;
    text-align: center;
  }
  .ikz-stat-list-num{
    font-weight: 600;
    margin-bottom: 20rpx;
  }
  .ikz-stat-list-line{
    border-right: 1px solid #bfbfbf;
  }
</style>
